﻿import Request from "../../base/request.js?t=202511041006"
import Storage from "../../base/storage.js?t=202511041006"
import {  downloadfun, isImageFile, IgetDeptList, queryURLParams, dealTime, getBrowserInfo, getRecentYears, showDeleteConfirm, previewCom } from "../../base/utils.js?t=202511041006"
const Composition = (proxy) => {
    const data = reactive({
        pagination: {
            total: 0,
            totalPage: 0,
            current: 1,
            pageSize: 10,
            loading: true,
            showTotal: total => `总共 ${total} 项`,
            defaultPageSize: 10,
            showSizeChanger: true, // 是否显示pagesize选择
            showQuickJumper: false, // 是否显示跳转窗
        },
        messageTest: "",
        isImport:false,
        proxy: "",
        previewInfo: {
            pdfurl: "",
            pdfOpen: false,
            previewShow: false,
            imgUrl: ""
        },
        settingList: [

        ],
        tableQueryParams: {
            DepartmentId: null,
            Time:null
        },
        checked: false,
        uItem: {

        },
        uploadIndex:-1,
        uploadImg1: {
            previewVisible: false,
            previewImage: "",
            previewTitle: "",
            fileList: [

            ]
        },
        uploadImg2: {
            previewVisible: false,
            previewImage: "",
            previewTitle: "",
            fileList: [

            ]
        },
        uploadImg3: {
            previewVisible: false,
            previewImage: "",
            previewTitle: "",
            fileList: [

            ]
        },
 
        yearlist: [],


        uploadLock: false,
        formData: {
            DepList:[]
        },
        rformData: {

        },
        popShow:false,
        deptList: [],
        rules: {
            Title: [{ required: true, message: '请填写标题', trigger: 'change' }],
        },
        urlinfo: {},
        userlinfo: {},
        isDetail: false,
        isRDetail: false,
        allChoose: false,
        upLoadRecord: [],
        reviewRecord: []
    })
    let params = toRefs(data)
    const methods = {
        handleSearchTableData: () => {
            methods.IGetEmergencyDrillPlan().then(res => {
                params.settingList.value = params.settingList.value.filter(e => {

                    const { DepartmentId, Time } = params.tableQueryParams.value;
                    const planDate = dayjs(e.PlanDate);

                    // 部门过滤
                    if (DepartmentId && e.DepartmentId != DepartmentId) return false;

                    // 时间过滤
                    if (Time && Time.length === 2) {
                        const [start, end] = Time;
                        const startTime = Number(dayjs(start).startOf('day').valueOf()) ;
                        const endTime = Number(dayjs(end).endOf('day').valueOf());
                        const planTime = Number(planDate.valueOf());
                 
                        if (planTime < startTime || planTime > endTime) {
                            return false;
                        }
                    }

                    return true;

  
                })
                params.pagination.value.current = 1
                params.pagination.value.pageSize = 10
                params.pagination.value.total = params.settingList.value.length
                params.pagination.value.totalPage = Math.ceil(params.settingList.value.length / params.pagination.value.pageSize)
        
            })
   
        },
        handleResetTableData: () => {
            params.tableQueryParams.value = {
                DepartmentId: null,
                Time: null
            }
            methods.IGetEmergencyDrillPlan()
        },
        getDeptList: () => {
            return new Promise(async (resolve, rej) => {
                params.deptList.value = await IgetDeptList(Request)
                if (params.deptList.value) {
                    resolve(1)
                }
            })
        },

        handleAllPass: () => {
            showDeleteConfirm({
                title: '确定一键复查所勾选的计划?',
                content: '',
                okFun: () => methods.IReviewEmergencyDrillReportItems()
            })
        },

        IGetDrillReviewLog: () => {
            params.uploadLock.value = true
            Request({
                url: "/EmergencyPlan/GetDrillReviewLog",
                method: 'post',
                data: {
                    ItemId: params.uItem.value.Id
                }
            }).then(res => {
                if (res.Code == 100) {
                    params.reviewRecord.value = res.Data.map(e => {
                        e.ResultName = e.Result ? '通过' : "驳回";
                        e.User = `${e.CreateUserName}(${e.CreateUser})`;
                        e.CreateTime = dealTime(e.CreateTime, 'YYYY-MM-DD HH:mm')
                        return e
                    })
                }
            }).finally(() => {
                params.uploadLock.value = false

            })
        },

        IReviewEmergencyDrillReportItems: () => {
            let ids = params.settingList.value.filter(e => e.ck).map(e => e.Id)
            params.uploadLock.value = true
            Request({
                url: "/EmergencyPlan/ReviewEmergencyDrillReportItems",
                method: 'post',
                data: ids
            }).then(res => {
                if (res.Code == 100) {
                    params.messageTest.value.info(res.Msg)
                }
            }).finally(() => {
                params.uploadLock.value = false

            })
        },
        handleReview: (item, isDetail, isRDetail) => {
            item.PlanDate = dayjs(item.PlanDate).format('YYYY-MM');
            params.uItem.value = item
            params.isDetail.value = isDetail ? true : false
            params.isRDetail.value = isRDetail ? true : false
            console.log(params.isDetail.value, params.isRDetail.value)
            if (isRDetail) {
                methods.IGetDrillReviewLog()
            }
            if (isDetail) {
                methods.IGetEmergencyDrillReportList()
            }
            params.popShow.value = true
        },

        handleUpload: (item, isDetail) => {
            item.PlanDate = dayjs(item.PlanDate).format('YYYY-MM');
            params.uItem.value = item
            params.isDetail.value = isDetail ? true : false
            methods.IGetEmergencyDrillReportList()

            if (isDetail) {
                methods.IGetDrillReviewLog()
            }

            params.popShow.value = true
        },

        handleCancel: () => {

            if (params.uItem.value.Status == 1 && !params.isRDetail.value) {
                showDeleteConfirm({
                    title: '确认驳回此计划',
                    content: '',
                    okFun: () => methods.IReviewEmergencyDrillReportItem(false)
                })
            }
            params.popShow.value = false

        },

        IReviewEmergencyDrillReportItem: (isPass) => {
            params.uploadLock.value = true
            Request({
                url: "/EmergencyPlan/ReviewEmergencyDrillReportItem",
                method: 'post',
                data: {
                    ItemId: params.uItem.value.Id,
                    Result: isPass,
                    Remark: params.rformData.value.Remark
                }
            }).then(res => {
                if (res.Code == 100) {
                    params.messageTest.value.info(res.Msg)
                    methods.IGetEmergencyDrillPlanReport()
                }
            }).finally(() => {
                params.uploadLock.value = false
                params.popShow.value = false
            })

        },

        handleallChoose: () => {
            params.allChoose.value = !params.allChoose.value
            if (params.allChoose.value) {
                params.formData.value.DepList = params.deptList.value.map(e => e.value)
            } else {
                params.formData.value.DepList = []
            }
        },
        IshowDeleteConfirm: (id) => {
            showDeleteConfirm({
                title: '确认删除此文件',
                content: '删除后不可恢复',
                okFun: () => methods.IDeleteEmergencyDrillReportFile(id)
            })
        },
        IGetEmergencyDrillPlanItemPageList: () => {
            params.uploadLock.value = true
            return new Promise((resolve, rejet) => {
                Request({
                    url: "/EmergencyPlan/GetEmergencyDrillPlanItemPageList",
                    method: 'post',
                    data: {
                        PlanId: params.urlinfo.value.id,
                        Page: params.pagination.value.current,
                        pageSize: params.pagination.value.pageSize,
                    }
                }).then((res) => {
                    params.pagination.value.total = res.Data.TotalItemCount
                    params.pagination.value.totalPage = res.Data.TotalPageCount
                    params.settingList.value = res.Data.Data?.map(e => {
                        e.PlanDate = dayjs(dealTime(e.PlanDate))
                        return e
                    }) || []
             
                }).finally(() => {
                    params.uploadLock.value = false
                })
            })
      

        },

        onPageChange: (a, b, c) => {
            params.pagination.value.current = a
            params.pagination.value.pageSize = b
            if (!params.isImport.value) {
                methods.IGetEmergencyDrillPlanItemPageList()
            }

        },
        delConfig: (index, item) => {
            if (item.Id) {
                params.uploadLock.value = true
                Request({
                    url: "/EmergencyPlan/DeleteDrillItem",
                    method: 'post',
                    data: {
                        Id: item.Id
                    }
                }).then(() => {
                    params.settingList.value = params.settingList.value.filter((_e, i) => i != index)
                }).finally(() => {
                    params.uploadLock.value = false
                })
            } else {
                params.settingList.value = params.settingList.value.filter((_e, i) => i != index)
            }
     
        },
        IGetEmergencyDrillPlanReport: () => {
            params.uploadLock.value = true
            Request({
                url: "/EmergencyPlan/GetEmergencyDrillPlanReport",
                method: 'post',
                data: {
                    Id: params.urlinfo.value.id
                }
            }).then(async res => {
                if (res.Code == 100) {
                    params.formData.value.Title = res.Data.Title
                    params.formData.value.user = `${res.Data.CreateUserName}(${res.Data.UpdateUser})`
                    params.formData.value.Remark = res.Data.Remark
                    params.formData.value.DepList = res.Data.DepList
                    params.formData.value.time = dealTime(res.Data.UpdateTime, 'YYYY-MM-DD HH:mm')
                    params.isImport.value = false
                    methods.IGetEmergencyDrillPlanItemPageList()
                }
            }).finally(() => {
                params.uploadLock.value = false
            })
        },
        WithdrawEmergencyDrillReport: (e) => {
            showDeleteConfirm({
                title: '确认撤回上传?',
                content: '',
                okFun: () => methods.IWithdrawEmergencyDrillReport(e)
            })
        },
        IWithdrawEmergencyDrillReport: (e) => {
            params.uploadLock.value = true
            Request({
                url: "/EmergencyPlan/WithdrawEmergencyDrillReport",
                method: 'post',
                data: {
                    ItemId: e.Id
                }
            }).then(res => {
                params.messageTest.value.info(res.Msg)
                methods.IGetEmergencyDrillPlanReport()
            }).finally(() => {
                params.uploadLock.value = false
            })
        },
        IGetEmergencyDrillReportList: () => {
            params.uploadLock.value = true
            Request({
                url: "/EmergencyPlan/GetEmergencyDrillReportList",
                method: 'post',
                data: {
                    ItemId: params.uItem.value.Id
                }
            }).then(res => {
                if (res.Code == 100) {
        
                    if (params.isDetail.value) {
                        params.upLoadRecord.value = res.Data.map(e => {
                            e.TypeName = { 1: "演练方案", 2: "季度评估表", 3: "照片" }[e.TypeId]
                            e.UpdateTime = dealTime(e.UpdateTime, 'YYYY-MM-DD HH:mm')
                            e.UploadUser = `${e.UploadUser}(${e.UpdateUser})`
                            e.FileName = e.FileInfo && e.FileInfo.FileName,
                                e.FilePath = e.FileInfo && e.FileInfo.FilePath
                            e.FileExtension = e.FileInfo && e.FileInfo.FileExtension.split('.')[1]
                            return e
                        })
                    } else {

                        let type1 = res.Data?.filter(e => e.TypeId == 1)
                        let type2 = res.Data?.filter(e => e.TypeId == 2)
                        let type3 = res.Data?.filter(e => e.TypeId == 3)
      
                        params.uploadImg1.value.fileList = type1.map(e => ({
                            url: e.FileInfo.FilePath,
                            name: e.FileInfo.FileName,
                            FileId:e.FileInfo.FileId,
                            FileName:e.FileInfo.FileName,
     
                            old: true
                        }))


                        params.uploadImg2.value.fileList = type2.map(e => ({
                            url: e.FileInfo.FilePath,
                            FileId: e.FileInfo.FileId,
                            FileName: e.FileInfo.FileName,
                            name: e.FileInfo.FileName,
                            old: true
                        }))


                        params.uploadImg3.value.fileList = type3.map(e => ({
                            url: e.FileInfo.FilePath,
                            FileId: e.FileInfo.FileId,
                            FileName: e.FileInfo.FileName,
                            name: e.FileInfo.FileName,
                            old:true
                        }))
                    }
                }
            }).finally(() => {
                params.uploadLock.value = false
            })
        },

        boxChange: () => {

            params.settingList.value = params.settingList.value.map(e => ({ ...e, ck: e.Status == 1 ? params.checked.value : null }))
        },

        addConfig: () => {
            let obj = {
                DepartmentId: null,
                PlanDate: null,
                DrillName: null,
                DrillType: null,
                Range: null,
            }
            params.settingList.value.push(obj)
        },
        iboxChange: (e) => {
            if (e == false) {
                params.checked.value = false
            }
        },


        handleImport: (info) => {
            if (!params.uploadLock.value) {
                params.uploadLock.value = true
                let formData = new FormData();
                formData.append('file', info.file.originFileObj)
                Request({
                    url: `/EmergencyPlan/ImportEmergencyDrillItem`,
                    method: 'post',
                    data: formData
                }).then(res => {
               
                    params.formData.value.DepList = res.Data.DepList
                    params.settingList.value = [
                        ...params.settingList.value,
                        ...res?.Data?.DataList.map(e => {
                            e.PlanDate = dayjs(dealTime(e.PlanDate))
                            return e
                        })

                    ]

                    params.pagination.value.total = params.settingList.value.length
                    params.pagination.value.totalPage = Math.ceil(params.settingList.value.length / params.pagination.value.pageSize)



                    params.isImport.value = true

                    params.uploadLock.value = false


                })

            }
        },

        handleChange: (info, type) => {
            let subarrys = info.fileList.filter(e => !e.old).map(e => e.originFileObj)
     
            if (!params.uploadLock.value) {
                params.uploadLock.value = true
                let formData = new FormData();
                for (let e of subarrys) {
                    formData.append('file', e)
                }
        
                Request({
                    url: `/download/uploadfile?Path=Emergency/DrillReport`,
                    method: 'post',
                    data: formData
                }).then(res => {
                    params[`uploadImg${type}`].value.fileList = [
                        ...res.Data.map(e => {
                            const { FilePath, FileName } = e
                            e.url = FilePath
                            e.name = FileName
                            return e
                        }),
                        ...params[`uploadImg${type}`].value.fileList.filter(e => e.FileId)
                    ] 
                    params.uploadLock.value = false
                })

            }
        },

        filterOption: (val, type) => {
            return `${type.label}`.includes(`${val || ''}`)
        },

        handleAddData: (data) => {
            params.uploadLock.value = true
            if (!params.urlinfo.value.type) {
                Request({
                    url: "/EmergencyPlan/AddEmergencyDrillPlan",
                    method: 'post',
                    data: data
                }).then(res => {
                    if (res.Code == 100) {
                        params.messageTest.value.info(res.Msg)
                        setTimeout(() => {
                            methods.onBack()
                        }, 1000)

                    }
                }).finally(() => {
                    params.uploadLock.value = false
                })
            } else {
                Request({
                    url: "/EmergencyPlan/EditEmergencyDrillPlan",
                    method: 'post',
                    data: data
                }).then(res => {
                    if (res.Code == 100) {
                        params.messageTest.value.info(res.Msg)
                        setTimeout(() => {
                            methods.onBack()
                        }, 1000)

                    }
                }).finally(() => {
                    params.uploadLock.value = false
                })
            }
        },
        IDeleteEmergencyDrillReportFile: (id) => {
            return new Promise((resolve, reject) => {
                params.uploadLock.value = true
                Request({
                    url: "/EmergencyPlan/DeleteEmergencyDrillReportFile",
                    method: 'post',
                    data: {
                        Id: params.isDetail.value? id:null,
                        Fid: !params.isDetail.value?id:null
                    }
                }).then(res => {
                    params.messageTest.value.info(res.Msg)
                    resolve()
                }).catch((err) => {
                    reject(err)
                }).finally(() => {
                    params.uploadLock.value = false
                    if (params.isDetail.value) {
                        methods.IGetEmergencyDrillReportList()
                    }
    
                })



            })
   
        },
        IhandlePopOp: (Status) => {
            if (params.uItem.value.Status == 1 && !params.isRDetail.value) {
                showDeleteConfirm({
                    title: '确认通过此计划?',
                    content: '',
                    okFun: () => methods.IReviewEmergencyDrillReportItem(true)
                })
            } else if ([0, 3].includes(params.uItem.value.Status) && !params.isDetail.value) {
                showDeleteConfirm({
                    title: '确认上传文件?',
                    content: '',
                    okFun: () => methods.handlePopOp(Status)
                })
            }
   
        },

        handleDownloadTemplate: () => {
            params.uploadLock.value = true
            downloadfun('应急演练模板', '../../File/Templete/EmergencyDrill/导入应急演练模板.xls').then(() => {
            }).finally(() => {
                params.uploadLock.value = false
            })
        },


        handlePopOp: (Status) => {
            if (params.isDetail.value) {
                return params.popShow.value = false
            }
 
            let u1arry = params.uploadImg1.value.fileList.filter(e => !e.old).map(e => ({ ItemId: params.uItem.value.Id, TypeId: 1, FileId: e.FileId, Status: Status }))
            let u2arry = params.uploadImg2.value.fileList.filter(e => !e.old).map(e => ({ ItemId: params.uItem.value.Id, TypeId: 2, FileId: e.FileId, Status: Status }))
            let u3arry = params.uploadImg3.value.fileList.filter(e => !e.old).map(e => ({ ItemId: params.uItem.value.Id, TypeId: 3, FileId: e.FileId, Status: Status }))

            params.uploadLock.value = true
            Request({
                url: "/EmergencyPlan/AddEmergencyDrillReport",
                method: 'post',
                data: {
                    ItemId: params.uItem.value.Id,
                    ItemList:[...u1arry, ...u2arry, ...u3arry],
                    Status
                },
            }).then(res => {
                params.messageTest.value.info(res.Msg)
                methods.IGetEmergencyDrillPlanReport()
            }).finally(() => {
                params.uploadLock.value = false
                params.popShow.value = false
            })
         
        },

        onSubmit(Status) {
            let obj = {
                Id: params.urlinfo.value.id,
                ...params.formData.value,
                Status,
                Items: params.settingList.value
            }

            if (Status == 0) {
                methods.handleAddData(obj)
            } else {
                params.proxy.value.$refs.FormRule.validate().then(() => {
                    methods.handleAddData(obj)
                }).catch((res) => {

                    params.messageTest.value.info(res.errorFields[0].errors[0] || res);
                })
            }
            


       
        },
        IGetEmergencyDrillPlan: () => {
            return new Promise((reslove, rej) => {

                params.uploadLock.value = true
                Request({
                    url: "/EmergencyPlan/GetEmergencyDrillPlan",
                    method: 'post',
                    data: {
                        Id: params.urlinfo.value.id
                    }
                }).then(res => {
                    params.formData.value.Title = res.Data.Title
                    params.formData.value.user = `${res.Data.CreateUserName}(${res.Data.UpdateUser})`
                    params.formData.value.Remark = res.Data.Remark
                    params.formData.value.DepList = res.Data.DepList
                    params.formData.value.time = dealTime(res.Data.UpdateTime, 'YYYY-MM-DD HH:mm')
                    params.settingList.value = res.Data.ItemList?.map(e => {
                        e.PlanDate = dayjs(dealTime(e.PlanDate), 'YYYY-MM')
                        return e
                    })


                    params.pagination.value.total = params.settingList.value.length;
                    params.pagination.value.totalPage = Math.ceil(params.settingList.value.length / params.pagination.value.pageSize)
                    params.isImport.value = true;



                    reslove()
                }).finally(() => {
                    params.uploadLock.value = false
                })


            })
         
        },
        onBack: () => {
            window.location.href ='/EmergencyManagement/EDList'
        },
        itemRender: (data,type) => {
            let uid = data.file.FileId
           const  btnPreview= (e, type) => {
                let item = params[`uploadImg${type}`].value.fileList.find(es => es.FileId == e)

                item.url = item?.FilePath || item.url
                if (item.FileName.indexOf('.pdf') != -1) {
                    params.previewInfo.value.pdfUrl = item.url
                    params.previewInfo.value.pdfOpen = true
                } else {
                    params.previewInfo.value.imgUrl = item.url
                    params.previewInfo.value.previewShow = true
                }
            }
            const  btnDownLoad= (e, type) => {
                    let item = params[`uploadImg${type}`].value.fileList.find(es => es.FileId == e)
                    item.url = item.FilePath || item.url
                    const { name, url } = item
                    params.uploadLock.value = true
                    downloadfun(name, url).finally(() => {
                        params.uploadLock.value = false
                    })
                }
               const  btnDelete= (e, type) => {

                        const { FileId } = e.file
                        if (FileId) {
                            params.uploadLock.value = true
                            methods.IDeleteEmergencyDrillReportFile(FileId).then(res => {
                                params[`uploadImg${type}`].value.fileList = params[`uploadImg${type}`].value.fileList.filter(e => e.FileId != FileId)
                                params.messageTest.value.success(res.Msg);
                            }).catch(err => {
                                console.log(err, 'err')
                            }).finally(() => {
                                params.uploadLock.value = false
                            })
                        }
                    }


            const previewBtn = h('img', { style: 'cursor:pointer;margin:0 4px;', onclick: () => { btnPreview(uid,type) }, src: "../Bussiness/img/svg/preview.svg", width: 20, height: 22 }, { default: () => '预览' })
            const downloadBtn = h('img', { style: 'cursor:pointer;margin:0 4px;', onclick: () => {btnDownLoad(uid,type) }, src: "../Bussiness/img/svg/download.svg", width: 20, height: 22 }, { default: () => '下载' })
            const deleteBtn = h('img', { style: 'cursor:pointer;margin:0 4px;', src: "../Bussiness/img/svg/delete.svg", width: 18, height: 22 }, { default: () => '删除' })
            const FDBtn = h(antd.Popconfirm, {
                title: "确定删除此文件？确定后不可恢复",
                onConfirm: () => btnDelete(data,type)

            }, { default: () => [deleteBtn] })
            var btns = h('div', { style: "display:flex;margin-left:10px" }, {
                default: () => [
                    isImageFile(data.file.url) ? previewBtn : null,
                    downloadBtn,
                    params.urlinfo.value.type == 9 ? null : FDBtn
                ]
            })
            return h('div', { style: 'margin-top:10px; width:400px;align-items:center; display:flex;justify-content:space-between' }, {
                default: () => [
                    data.file.name, btns
                ]
            })

        },
        handlePreview: (item) => {
            if (item.FileName.indexOf('.pdf') != -1) {
                params.previewInfo.value.pdfUrl = item.FilePath
                params.previewInfo.value.pdfOpen = true
            } else {
                params.previewInfo.value.imgUrl = item.FilePath
                params.previewInfo.value.previewShow = true
            }
        },
        downLoad: (FileName, FilePath) => {
            downloadfun(FileName, FilePath)
        },
        init: () => {
            getBrowserInfo().catch(err => { console.log(err) })
            params.urlinfo.value = queryURLParams()
            params.yearlist.value = getRecentYears()
            params.formData.value.Years = dayjs().format('YYYY')

            let info = Storage.get('AccountInfo', true)
            params.userlinfo.value =info
            Request({
                url: "/Account/createJwtToken",
                method: 'post',
                data: {
                    "userName": info && info.UserNo
                }
            }).then(res => {
                Storage.set('token', res.Data,true)

                methods.getDeptList().then(() => {
                    if (params.urlinfo.value.type) {
                        //详情 或者 编辑
                        methods.IGetEmergencyDrillPlan()
                    } else {
                        //上传 或者 复查
                        if (params.urlinfo.value.target) {
                            methods.IGetEmergencyDrillPlanReport()
                        } else {
                            params.formData.value.user = `${info.UserName}(${info.UserNo})`
                            params.formData.value.time = dayjs().format('YYYY-MM-DD HH:mm')
                        }
                      

                    }
                })

           

            })

            if (proxy) {
                params.proxy.value = proxy
            }
            const { message } = antd
            params.messageTest.value = message
            params.messageTest.value.config({
                top: `10vh`,
                duration: 7,
                maxCount: 1,
                rtl: true,
            });

        },

    }
    const template = {
        imageModel: previewCom(params, methods).imageModel,
        pdfPopModel: previewCom(params, methods).pdfPopModel,
        bottomBtns: {
            template: `<div class="w-full bg-[#eeeeee] h-50  flex  items-center justify-end pr-4">
                    <a-space>

  <a-popconfirm
    title="确定执行此操作?"
    ok-text="确定"
    cancel-text="取消"
    @confirm="onSubmit(0)"
  >
          <a-button  :loading="uploadLock" v-if="urlinfo.type!=9&&!urlinfo.target">保存</a-button>
  </a-popconfirm>
  <a-popconfirm
    title="确定执行此操作?"
    ok-text="确定"
    cancel-text="取消"
    @confirm="onSubmit(1)"
  >
          <a-button  :loading="uploadLock" v-if="urlinfo.type!=9&&!urlinfo.target" type="primary">发布</a-button>
  </a-popconfirm>
                        <a-button v-on:click="onBack" :loading="uploadLock">返回</a-button>
                    </a-space>
                </div>`,
            setup() {

                return {
                    ...params,
                    ...methods,
                };
            }

        }
    }
    return {
        ...params,
        ...methods,
        template
    }
}
export default Composition